import 'package:flutter/material.dart';
import 'package:qgchat/common/global/global.dart';

///
/// 评论数组件
///

class SquareComment extends StatelessWidget {
  const SquareComment(
    this.comcount, {
    this.onPressed,
    Key key,
  }) : super(key: key);

  final int comcount; // 评论数
  final Function onPressed; // 评论数

  @override
  Widget build(BuildContext context) {
    return Container(
      height: px(50),
      child: FlatButton.icon(
        onPressed: onPressed,
        padding: EdgeInsets.zero,
        icon: Image.asset(
          "assets/images/icon/comment.png",
          width: px(32),
          height: px(32),
        ),
        label: Text(
          "$comcount",
          style: TextStyle(
            color: col("303133"),
            fontSize: px(24),
          ),
        ),
      ),
    );
  }
}
